package org.apache.click.doubleclick.inject;

import java.util.concurrent.ConcurrentHashMap;

public class BeanNameCache {
    private final ConcurrentHashMap<Class<?>, String> nameCache = new ConcurrentHashMap<Class<?>, String>();

    //TODO: find bean with interface and with bean name; and cache the found bean names
    //reference: AnnotProxyFieldValueFactory.java (org.apache.wicket.spring)


//    private String getBeanName(Field field) {
//        InjectBean annotation = field.getAnnotation(InjectBean.class);
//
//        String name = annotation.name();
//        if (name == null || name.length() == 0) {
//            name = nameCache.get(field.getType());
//            if (name == null) {
//                name = getBeanNameOfClass(contextLocator.getSpringContext(), field.getType());
//                nameCache.put(field.getType(), name);
//            }
//        }
//        return name;
//    }
}
